package com.qf.day06;

public class Fish extends Animal{
    private String swim;

    public Fish() {
        super();
    }

    public Fish(String swim) {
        super();
        this.swim = swim;
    }

    public Fish(String name, String type, String sex, int age, String swim) {
        super(name, type, sex, age);
        this.swim = swim;
    }
    public void swim(){
        System.out.println(this.getName()+"在游泳");
        paopao();
    }
    private void paopao(){
        System.out.println(this.getName()+"在吐泡泡");
    }
    @Override
    public String toString() {
        return "Dog{" +
                "name"+getName()+","+
                "type"+getType()+","+
                "sex"+getSex()+","+
                "age"+getAge()+","+
                "hungr"+getHungry()+","+
                ","+"swim='" + swim + '\'' +
                "} ";
    }
}
